package com.ewing.busi.pay.dao;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.ewing.busi.pay.model.PayWxResultDetail;
import com.ewing.common.constants.IsEff;
import com.ewing.core.jdbc.BaseDao;

@Repository
public class PayWxResultDetailDao {
  
  @Resource
  private BaseDao baseDao;
  
  public PayWxResultDetail getByPrepayIdAndBizId(String prepayId, String bizId){
    StringBuilder condition = new StringBuilder();
    condition.append("pre_pay_id='" + prepayId  + "'");
    condition.append(" and biz_id='" + bizId +"'" );
    condition.append(" and iseff = '" + IsEff.EFFECTIVE.getValue() + "'");
    return baseDao.findOne(condition.toString(), PayWxResultDetail.class);
  }

}
